package cn.like.entity;

import cn.like.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 用户(AuthUser)表实体类
 *
 * @author like
 * @since 2021-07-08 15:59:14
 */
@Data
@TableName("auth_user")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "用户")
@Accessors(chain = true)
@SuppressWarnings("serial")
public class AuthUser extends BaseEntity<AuthUser> {
	
	public static final String id_col_name = "id";
	public static final String account_col_name = "account";
	public static final String name_col_name = "name";
	public static final String orgId_col_name = "org_id";
	public static final String stationId_col_name = "station_id";
	public static final String email_col_name = "email";
	public static final String mobile_col_name = "mobile";
	public static final String sex_col_name = "sex";
	public static final String status_col_name = "status";
	public static final String avatar_col_name = "avatar";
	public static final String workDescribe_col_name = "work_describe";
	public static final String passwordErrorLastTime_col_name = "password_error_last_time";
	public static final String passwordErrorNum_col_name = "password_error_num";
	public static final String passwordExpireTime_col_name = "password_expire_time";
	public static final String password_col_name = "password";
	public static final String lastLoginTime_col_name = "last_login_time";
	public static final String createUser_col_name = "create_user";
	public static final String createTime_col_name = "create_time";
	public static final String updateUser_col_name = "update_user";
	public static final String updateTime_col_name = "update_time";
	
	
	@TableId(value = "id", type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "主键")
	@NotNull(message = "id不能为空")
	private Long id;
	
	/**
	 * 账号
	 */
	@ApiModelProperty(value = "账号")
	private String account;
	
	/**
	 * 姓名
	 */
	@ApiModelProperty(value = "姓名")
	private String name;
	
	/**
	 * 组织ID
	 * #c_core_org
	 */
	@ApiModelProperty(value = "组织ID#c_core_org")
	private Long orgId;
	
	/**
	 * 岗位ID
	 * #c_core_station
	 */
	@ApiModelProperty(value = "岗位ID#c_core_station")
	private Long stationId;
	
	/**
	 * 邮箱
	 */
	@ApiModelProperty(value = "邮箱")
	private String email;
	
	/**
	 * 手机
	 */
	@ApiModelProperty(value = "手机")
	private String mobile;
	
	/**
	 * 性别
	 * #Sex{W:女;M:男;N:未知}
	 */
	@ApiModelProperty(value = "性别#Sex{W:女;M:男;N:未知}")
	private String sex;
	
	/**
	 * 启用状态 1启用 0禁用 {@link cn.like.constants.AuthUserConstants.Status}
	 */
	@ApiModelProperty(value = "启用状态 1启用 0禁用")
	private Integer status;
	
	/**
	 * 头像
	 */
	@ApiModelProperty(value = "头像")
	private String avatar;
	
	/**
	 * 工作描述
	 * 比如：  市长、管理员、局长等等   用于登陆展示
	 */
	@ApiModelProperty(value = "工作描述 比如：  市长、管理员、局长等等 用于登陆展示")
	private String workDescribe;
	
	/**
	 * 最后一次输错密码时间
	 */
	@ApiModelProperty(value = "最后一次输错密码时间")
	private LocalDateTime passwordErrorLastTime;
	
	/**
	 * 密码错误次数
	 */
	@ApiModelProperty(value = "密码错误次数")
	private Integer passwordErrorNum;
	
	/**
	 * 密码过期时间
	 */
	@ApiModelProperty(value = "密码过期时间")
	private LocalDateTime passwordExpireTime;
	
	/**
	 * 密码
	 */
	@ApiModelProperty(value = "密码")
	private String password;
	
	/**
	 * 最后登录时间
	 */
	@ApiModelProperty(value = "最后登录时间")
	private LocalDateTime lastLoginTime;
	
	/**
	 * 创建人id
	 */
	@ApiModelProperty(value = "创建人id")
	@TableField(fill = FieldFill.INSERT)
	private Long createUser;
	
	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	private LocalDateTime createTime;
	
	/**
	 * 更新人id
	 */
	@ApiModelProperty(value = "更新人id")
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private Long updateUser;
	
	/**
	 * 更新时间
	 */
	@ApiModelProperty(value = "更新时间")
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private LocalDateTime updateTime;
}